﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Epi;

namespace CDC.SampleShell.Infrastructure
{
    public interface IRepository<TEntity> where TEntity : IEntity
    {
        IUnitOfWork<TEntity> UnitOfWork { get; }

        TEntity CreateNew();
        TEntity FindOne(View form, Guid id);
        IEnumerable<TEntity> FindRecords(View form, ISpecification criteria);
        IEnumerable<TEntity> FetchAll(View form);
    }
}
